<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>OpenBSD Upgrade Guide 4.4</title>
<link rev="made" href="mailto:www@openbsd.org">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="resource-type" content="document">
<meta name="description"   content="OpenBSD Upgrade Process for 4.3 -> 4.4">
<meta name="keywords"      content="openbsd,faq,upgrade,4.4">
<meta name="distribution"  content="global">
<meta name="copyright"     content="This document copyright 2008 by OpenBSD">
</head>

<body bgcolor="#ffffff" text="#000000">
<a href="../index.html">
<img alt="[OpenBSD]" height=30 width=141 src="../images/smalltitle.gif" border="0">    
</a>
<p>
<font color="#0000e0">
<a href="upgrade35.html">[3.4 -> 3.5]</a> |
<a href="upgrade36.html">[3.5 -> 3.6]</a> |
<a href="upgrade37.html">[3.6 -> 3.7]</a> |
<a href="upgrade38.html">[3.7 -> 3.8]</a> |
<a href="upgrade39.html">[3.8 -> 3.9]</a> |
<br>
<a href="upgrade40.html">[3.9 -> 4.0]</a> |
<a href="upgrade41.html">[4.0 -> 4.1]</a> |
<a href="upgrade42.html">[4.1 -> 4.2]</a> |
<a href="upgrade43.html">[4.2 -> 4.3]</a> |
<a href="index.html">[FAQ Index]</a>
</font>

<h1><font color="#e00000">
<!--
Upgrade Guide: 4.3 to 4.4
-->
Work In Progress, don't even try it (yet)!
</font></h1>
<hr>

<i>Note: Upgrades are only supported from one release to the release
immediately following it.
Do not skip releases.</i>

<p><i>
It is highly recommended that you read through and fully understand
this process before attempting it.
If you are doing it on a critical or physically remote machine, it is
recommended that you test this process on an identical, local system to
verify its success before attempting on a critical or remote computer.
</i>

<p>
Upgrading is a convenient way to bring your OpenBSD system up to the most
recent version.
However, the results are not intended to precisely match the results of
a wipe-and-reload installation.
Old library files in particular are not removed in the upgrade process,
as they may be required by older applications that may or may not be
upgraded at this time.
If you REALLY wish to get rid of all these old files, you are probably
better off reinstalling from scratch.

<p>
Table of Contents:
<ul>
<li><a href="#before">Before upgrading</a>
  <ul>
  <li><a href="#"></a>
  <li><a href="#rc.conf">rc.conf</a>
  <li><a href="#kern">Modified kernel</a>
  </ul>
<li><a href="#upgrade">The upgrade process</a>
<li><a href="#final">Final steps</a>
  <ul>
  <li><a href="#UsersGroups">New and changed Users and Groups</a>
  <li><a href="#etcUpgrade">Upgrading <tt>/etc</tt></a>
  <li><a href="#Kernchk">Checking the kernel</a>
  <li><a href="#Pkgup">Upgrading packages</a>
  </ul> 
</ul>

<hr>
<p>
<a name="before"></a>
<h2>Before upgrading: things to think about and be aware of</h2>
This is <i>not</i> a complete list of the changes that took place
between 4.3 and 4.4, but rather some of the important things that will
impact a large number of users in the upgrade process.
For a more complete list of changes, see
<a href="../plus44.html">plus44.html</a> and the CVS change logs.

<ul>

<p>
<a name="rc.conf"></a>
<li><b>rc.conf:</b><br>
Unlike earlier versions of this process, since
<a href="upgrade41.html">4.1</a> it is assumed that
<tt>/etc/rc.conf</tt> is not a user-altered file.
If you have made changes to your <tt>/etc/rc.conf</tt> file, merge those
changes into <tt>/etc/rc.conf.local</tt>.
If you have NO <tt>/etc/rc.conf.local</tt>, simply copy your existing
<tt>/etc/rc.conf</tt> file to <tt>/etc/rc.conf.local</tt> and
<i>delete the last line of the script!</i>
Otherwise, pull your existing <tt>rc.conf</tt> into the top of your
existing <tt>rc.conf.local</tt> file <i>and remove the last line</i>
before doing the rest of this process.

<p>
<a name="kern"></a>
<li><b>Modified kernel:</b><br>
Check whether you have made any modifications to your kernel.
For example, you might have modified your network device to use a
non-default setting using config(8).
Note your changes, so you can repeat them for the new 4.4 kernel.

</ul>

<p>
<hr>
<a name="upgrade"></a>
<h2>The upgrade process</h2>

<h3>Upgrading by install kernel</h3>
If you have access to the system's console, the easiest and safest way
to upgrade is to boot from install media or
<a href="faq4.html#bsd.rd">bsd.rd</a> and follow the upgrade steps,
which are very similar to the <a href="faq4.html">install process</a>.
Afterwards, complete the upgrade by following the <a href="#final">final
steps</a> as detailed below.

<p>
One easy way to boot from the install kernel is to place the 4.4 version
of <i>bsd.rd</i> in the root of your boot drive, then instruct the boot loader
to boot using this new <i>bsd.rd</i> file.
On amd64 and i386, you do this by entering "<tt>boot bsd.rd</tt>" at the
initial <tt>boot&gt;</tt> prompt.

<h3>Upgrading without install kernel</h3>
<i>This is NOT the recommended process.  Use the install kernel method
if at all possible!</i>

<p>
Sometimes, one needs to do an upgrade of a machine when one can't easily
use the normal upgrade process.
The most common case is when the machine is in a remote location and you
don't have easy access to the system console.
One can usually do this by carefully following this process:

<ul>
<li><b>Place install files in a "good" location</b>.
Make sure you have sufficient space!

<p>
<li><b>Stop any "insecure" applications from starting at boot:</b>
There will be a time when PF will be unlikely to be running during this
upgrade process, but your applications may still start and run properly.
Any application dependent upon PF for security should be disabled 
before this happens, and should not be re-enabled until proper PF
operation is verified after upgrade.
There may be other applications which you wish to keep from running
during the upgrade, stop and disable them as well.

<p>
<li><b>Check the kernel:</b>
Although <b>most people can skip this step</b>, if you had a modified kernel
in 4.4, it is likely you will need to modify the stock kernel of 4.4.
Especially when you are performing the upgrade process remotely, now is
the time to make sure the new kernel will work upon rebooting the machine.
If any changes must be made to the kernel, the safest thing to do is to
make those changes on a local 4.4 system.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult <a href="faq5.html">FAQ 5 - Building the system from source</a>
before considering to recompile your kernel.

<p>
<li><b>Install new kernel(s)</b>
<blockquote><pre>
<b>export RELEASEPATH=</b><i>/usr/rel</i>   <i># where you put the files</i>
<b>cd ${RELEASEPATH}</b>
<b>rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd</b>
<b>cp bsd.rd bsd.mp /</b>
</pre></blockquote>

(if you are using the multiprocessor kernel, use<br>
<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd</b></tt><br>
instead)

<p>
Note the extra steps for copying over the primary kernel: those are done
to ensure that there is always a valid copy of the kernel on the disk
that the system can boot from should there be a really badly timed power
outage or system crash.

<p>
<li><b>Install new <tt>/etc/firmware</tt> files:</b>
Due to the fact that some uploaded "firmware" files may have been updated,
you may need to update the files in the <tt>/etc/firmware</tt> directory.
This will impact users of only a few devices, though all users can use
this step without harm.
To extract the firmware files from <tt>base44.tgz</tt>, use the
following as root:

<blockquote><pre>
<b>cd /</b>
<b>tar -C / -xzphf ${RELEASEPATH}/base44.tgz ./etc/firmware</b>
</pre></blockquote>

<p>
<li><b>Install new <tt>/sbin/ifconfig</tt> utility:</b>
Sometimes the network drivers (especially more complex devices such as
<tt>pppoe(4)</tt>) in the new kernel need an updated <tt>ifconfig</tt>
utility to be configured properly after the reboot in the next step.
Again, it's something that all users can do without harm, but if you are
performing your remote upgrade over a <tt>pppoe(4)</tt> connection this
step can be crucial.
To extract the <tt>ifconfig</tt> utility from <tt>base44.tgz</tt>, use the
following as root:

<blockquote><pre>
<b>tar -C / -xzphf ${RELEASEPATH}/base44.tgz ./sbin/ifconfig</b>
</pre></blockquote>

<p>
<li><b>Reboot on the new kernel:</b>
This might be a tempting step to skip, but it should be done now, as
usually, the new kernel will run old userland apps (such as the soon to
be important <tt>reboot</tt>!), but often a new userland will NOT
work on the old kernel.

<p>
<li><b>Install new userland applications.</b>
<i>Do NOT install <tt>etc44.tgz</tt> and <tt>xetc44.tgz</tt> now, because
that will overwrite your current configuration files!</i>

<blockquote><pre>
<b>export RELEASEPATH=</b><i>/usr/rel</i>
<b>cd ${RELEASEPATH}</b>
<b>tar -C / -xzphf base44.tgz</b>
<b>tar -C / -xzphf comp44.tgz</b>
<b>tar -C / -xzphf game44.tgz</b>
<b>tar -C / -xzphf man44.tgz</b>
<b>tar -C / -xzphf misc44.tgz</b>
<b>tar -C / -xzphf xbase44.tgz</b>
<b>tar -C / -xzphf xfont44.tgz</b>
<b>tar -C / -xzphf xserv44.tgz</b>
<b>tar -C / -xzphf xshare44.tgz</b>
</pre></blockquote>

Note: not all file sets will need to be installed for all applications,
however if you installed a file set originally, you should certainly
upgrade it with the new file set now.

<p>
Note: the files in <tt>/etc</tt> are handled separately below, so
<tt>etc44.tgz</tt> and <tt>xetc44.tgz</tt> are NOT unpacked here.

<p>
<li><b>Upgrade <tt>/dev</tt>.</b>
The new 
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=MAKEDEV&amp;sektion=8&amp;arch=i386">MAKEDEV</a>
file will be copied to /dev by the installation of
<tt>base44.tgz</tt>, so you simply need to do the following:
<blockquote><pre>
<b>cd /dev</b>
<b>./MAKEDEV all</b>
</pre></blockquote>

<p>
<li><b>Upgrade <tt>/etc</tt> as below</b>.

<p>
<li><b>Reboot</b>
</ul>

During this process,
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sendmail&amp;sektion=8">sendmail(8)</a>
may produce some error messages like the following:
<pre>
    Nov 1 12:47:05 puffy sm-mta[16733]: filesys_update failed: No such file or dire
    ctory, fs=., avail=-1, blocksize=380204
</pre>
These messages can be safely ignored for the moment, or you may wish to
halt sendmail(8) during the upgrade process.
Note that sendmail is not working properly at this point, and will need
to be restarted (as part of the reboot) before mail is expected to be
handled properly.

<p>

<hr>
<a name="final"></a>
<h2>Final steps</h2>

Whether you upgrade by using an install kernel and doing a formal  
"upgrade" process, or do a "in-place" binary upgrade, there are certain 
manual steps that have to be performed.
  
<a name="UsersGroups"></a>
<h3>1. New and changed Users and Groups</h3>
A new user is needed for
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=rtadvd&amp;sektion=8">rtadvd</a>,
Create the user and group using
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=useradd&amp;sektion=8">useradd(8)</a>
<blockquote><pre>
<b>useradd -u92 -g=uid -c"IPv6 Router Advertisement Daemon" -d/var/empty -s/sbin/nologin _rtadvd</b>
</pre></blockquote>

<a name="etcUpgrade"></a>
<h3>2. Upgrading <tt>/etc</tt></h3>
<p>
You will want to extract the <tt>etc44.tgz</tt> files to a temporary
location:
<blockquote><pre>
<b>tar -C /tmp -xzphf ${RELEASEPATH}/etc44.tgz</b>
</pre></blockquote>


Files that can probably be copied from <tt>etc44.tgz</tt> "as is":

<blockquote><pre>
 ... tbd ...
</pre></blockquote>

Note that it IS possible to locally modify these files, if this has been
done, manual merging will be needed.
Pay special attention to <tt>mail/*</tt> if you are using something
other than the default Sendmail(8) configuration.
Here are copy/paste lines for copying these files, assuming you unpacked 
<tt>etc44.tgz</tt> in the above recommended place:

<blockquote><pre>
<b>cd /tmp/etc
...XXX </b>
</pre></blockquote>

<p>
<a name="patchfile"></a>
These files likely have local changes, but should be updated for
4.4.  IF you have not altered these files, you can copy over the
new version, otherwise the changes must be merged with your files:

<blockquote><pre>
...XXX
</pre></blockquote>

The changes to these files are in <a href="upgrade44.patch">this
currently nonexistant
patch file</a>.
You can attempt to use this by executing the following as root:
<blockquote><pre>
<b>cd /</b>
<b>patch -C -p0 &lt; upgrade44.patch</b>
</pre></blockquote>

This will test the patch to see how well it will apply to YOUR system,
to actually apply it, leave off the "<tt>-C</tt>" option.
Note that it is likely that if you have customized files or not kept
them closely updated, or are upgrading from a snapshot of 4.3, they may
not accept the patch cleanly.
In those cases, you will need to manually apply the changes.
Please test this process before relying on it for a machine you can not
easily get to.

<p>
The following files have had changes which should be looked at, but it
is unlikely they should be directly copied or merged (i.e., if you are
using pf.conf, look at the suggested change of strategy, and decide if
it is appropriate for your use).

<blockquote><pre>
XXX
</pre></blockquote>

<p>
There are a couple files that can be deleted that are no longer used
in 4.4:

<blockquote><pre>
XXX
</pre></blockquote>


Finally, use
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=newaliases&amp;sektion=8">newaliases(8)</a>
to update the aliases database,
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mtree&amp;sektion=8">mtree(8)</a>
to create any new directories, and change the ownership and access to
<tt>/etc/chio.conf</tt>:

<blockquote><pre>
<b>newaliases</b>
<b>mtree -qdef /etc/mtree/4.4BSD.dist -p / -u</b>
<b>chown root:operator /etc/chio.conf</b>
<b>chmod 644 /etc/chio.conf</b>
</pre></blockquote>

<a name="Kernchk"></a>
<h3>3. Checking the kernel</h3>
Note: <b>most people can skip this step!</b>
<p>
If you followed the instructions for the upgrade process without install
kernel, you have already completed this step.
However, if you used the install kernel, and if you had a modified kernel
in 4.3, it is likely you will need to modify the stock kernel of 4.4.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult <a href="faq5.html">FAQ 5 - Building the system from source</a>
before considering to recompile your kernel.

<a name="Pkgup"></a>
<h3>4. Upgrading packages</h3>
If you installed any packages on your system, you should upgrade them
after completing the upgrade of the base system.
Be aware, however, many packages will require further setup before
and/or after upgrading the package.
Check with the application's upgrade guide for details.

<p>
The package tools support in-place updating using <tt>pkg_add -u</tt>.
For instance, to update all your packages, make sure <tt>PKG_PATH</tt> is
pointing to the 4.4 packages directory on your CD or nearest FTP mirror,
and use something like
 
<blockquote><pre>
#<b> pkg_add -ui -F update -F updatedepends</b>
</pre></blockquote>

where the <tt>-u</tt> indicates update mode, and <tt>-i</tt> specifies
interactive mode, so pkg_add will prompt you for input when it encounters
some ambiguity. Read the
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=pkg_add&amp;sektion=1&amp;manpath=OpenBSD+4.4">pkg_add(1)</a>
manual page and the <a href="faq15.html#PkgMgmt">package management</a>
chapter of the FAQ for more information.

A
<p>
<font color="#0000e0">
<a href="upgrade35.html">[3.4 -> 3.5]</a> |
<a href="upgrade36.html">[3.5 -> 3.6]</a> |
<a href="upgrade37.html">[3.6 -> 3.7]</a> |
<a href="upgrade38.html">[3.7 -> 3.8]</a> |
<a href="upgrade39.html">[3.8 -> 3.9]</a> |
<br>
<a href="upgrade40.html">[3.9 -> 4.0]</a> |
<a href="upgrade41.html">[4.0 -> 4.1]</a> |
<a href="upgrade42.html">[4.1 -> 4.2]</a> |
<a href="upgrade43.html">[4.2 -> 4.3]</a> |
<a href="index.html">[FAQ Index]</a>
</font>

<p>
<hr>
<a href="index.html"><img height="24" width="24" src="../images/back.gif" border="0" alt="[back]"></a>
<a href="mailto:www@openbsd.org">www@openbsd.org</a>
<br>
<small>$OpenBSD: upgrade44.html,v 1.1 2008/08/20 02:21:54 nick Exp $</small>

</body>
</html>
